import type { DefineComponent } from 'vue'

const modules = import.meta.glob<Record<string, DefineComponent>>('./**/*.vue', { eager: true })
const icons: {
  name: string
  component: DefineComponent
}[] = []

for (const path in modules) {
  icons.push({
    name: path.replace(/(.*\/)*([^.]+).*/gi, '$2'),
    component: modules[path].default
  })
}

export default icons
